package vashion.azeroth.core.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import vashion.azeroth.contant.AzerothConstants;
import vashion.azeroth.core.manager.personal.PersonalMemberVipManager;
import vashion.azeroth.core.personal.pojo.PersonalMemberVip;
import vashion.azeroth.core.service.PersonalMemberVipService;

@Service
public class PersonalMemberVipServiceImpl<T> implements PersonalMemberVipService<T> {


	@Autowired
	private PersonalMemberVipManager personalMemberVipManager;

	@Override
	public Boolean isVip(Long memberId) {
		PersonalMemberVip memberVip = personalMemberVipManager.get(memberId);
		if(null != memberVip && !memberVip.getVipLevel().equals(AzerothConstants.PersonalMemberVip.MemberVipLevel.V0)) {
			return Boolean.TRUE;
		}
		return Boolean.FALSE;
	}

}
